package com.example.boot.rabbitmq.common.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @author ccubee
 * @since 21-3-7 23:29
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Message implements Serializable {

    private static final long serialVersionUID = -6365149786358807522L;


    private String messageId;

    private String topic;

    private String routingKey = "";
    /**
     * 消息的附加属性
     */
    private Map<String, Object> attributes = new HashMap<>();

    /**
     * 延迟消息参数配置
     */
    private int delayMills;

    private String messageType = MessageType.CONFIRM;

}
